<? session_start();
?>
<script language="javascript" src="/jsLibrary/clienthint_ajax.js"></script>
<?php
 require "../../../global.php";
require RootDir."/"."inc/config.php";
require RootDir."/".$SystemConest[1]."/system/Config.php";
require RootDir."/".$SystemConest[1]."/system/menusys/function.php";
$mydb=new YYBDB();
$fid=$_GET['fid'];
$MenuId=$_GET['MenuId'];
$FieldName=$_GET['FieldName'];
$sql="select * from ".$SystemConest[7].$SystemTablename[0]."  where  ".$SystemTablename[0].getMenuidofFieldNum($mydb,$MenuId)."=$MenuId and  ".$SystemTablename[0]."2=$fid";

$result=$mydb->db_query($sql);
$num=$mydb->db_num_rows($result);
if($num<1) die;
echo "<input type='hidden' value='".$FieldName.$fid."' id='".$FieldName."_Min'>";

?>
<select id="st<? echo $FieldName.$fid;?>" name="st<? echo $FieldName.$fid;?>">
  <option value='-1' selected>请选择分类</option>
  <?php
	while($row=mysql_fetch_row($result)){
		echo "<option value='$row[0]'>".htmlspecialchars($row[1])."</option>";
	}
	?>
	</select>
	   <?php echo "<span id='".$FieldName.$fid."'></span>";?>
       <span id="<?php echo $FieldName.$fid;?>_Span_c"></span>
    <script language="javascript">
	$(document).ready(function(){
		$("#st<? echo $FieldName.$fid;?>").live("change", function(){
			var temp=$(this).val();
			alert(temp+"g");
			$("#<?php  echo $FieldName."_class";?>").val(temp+"");
			
			
		});
	});
	</script>   
        
	  